package org.spring4speedtracer.example.service;

import org.spring4speedtracer.example.service.child.FastService;
import org.spring4speedtracer.example.service.child.SlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Implementation of example top-level service.
 * 
 * @author Dustin
 * 
 */
@Service("mainService")
public class MainServiceImpl implements MainService {

	@Autowired
	private FastService fastService;

	@Autowired
	private SlowService slowService;

	@Override
	public void fastMethod() {
		fastService.runFast();
		fastService.runFast();
		fastService.runFast();
	}

	@Override
	public String slowMethod(String arg) {
		return slowService.runSlow(arg);
	}
}
